<?php if(!empty($teams)): ?>
<table class="table table-striped table-condensed">
    <tr>
        <th>#</th>
        <th>Name</th>
        <th style="width:150px">Budget</th>
        <th>Abteilung</th>
        <th>Kostenstelle</th>
    </tr>
    
    <?php foreach($teams as $team): ?>
    <tr>
        <td><?php echo $team->id; ?></td>
        <td><?php echo anchor('/data_management/team/'.$team->id, $team->name); ?></td>
        <td>
            <?php 
				echo ($team->budget != NULL) ? 
                                number_format($team->budget, 2, ',', '.').' €' : 
					'<span style="color:red">Nicht festgelegt!</span>'.anchor('/data_management/budget/'.$team->id,'<i class="icon-tag"></i>',array('class' => 'action-icon', 'rel' => 'tooltip', 'title' => 'Budget festlegen')); ?>
        </td>
        <td><?php echo $team->department()->name; ?></td>
        <td><?php echo $team->costcenter()->id; ?></td>
    </tr>
    <?php endforeach; ?>
    
</table>
<?php else: ?>

<div class="alert alert-error">Keine Daten gefunden!</div>

<?php endif; ?>

